<?php
/*
Engineer: Alex Arey
Updated: 12/2/2011
Description: Displays information on searched internships 

*/


 ?>

<ul>
    <li>
        <a href="<?php echo $this->url(array('controller'=>'partner','action'=>'allinternships')) ?>">View Past Internships</a>
    </li>
    <li>
	<a href="<?php echo $this->url(array('controller'=>'partner','action'=>'submitinternship')) ?>">Submit New Internship Request</a>
    </li>
</ul>
<h3>Your current internship requests:</h3>
<table>
    <tr>
        <th>Position</th>
        <th>Term</th>
        <th>Positions Requested</th>
        <th>Positions Possible</th>
    </tr>
<?php if($this->positions):?>
    <?php 
	//iterate through internship positions found
	foreach($this->positions as $pos): ?>
    <tr>
        <td><a href="
		<?php echo $this->url(array('controller'=>'partner','action'=>'positiondetails','position'=>$pos['POSID'])); ?>
		"><?php echo $pos['NAME'] ?></a></td>
	<td><?php echo $pos['TERM'] ?></td>
        <td><?php echo $pos['POSITIONSREQUESTED'] ?></td>
	<td><?php echo $pos['POSITIONSGRANTED'] ?></td>  	
    </tr>
    <?php endforeach ?>
<?php endif; ?>
<?php if(!$this->positions):?>
	<tr>
		<td colspan = "4" align="center">You have no current internship requests.</td>
	</tr>
<?php endif; ?>
 </table>
